3.165 \(\int \frac{\cos ^3(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^2} \, dx\)

Optimal. Leaf size=68 \[ \frac{2 \sin ^5(c+d x)}{5 a^2 d}-\frac{\sin ^3(c+d x)}{a^2 d}+\frac{\sin (c+d x)}{a^2 d}+\frac{2 i \cos ^5(c+d x)}{5 a^2 d} \]

[Out]

(((2*I)/5)*Cos[c + d*x]^5)/(a^2*d) + Sin[c + d*x]/(a^2*d) - Sin[c + d*x]^3/(a^2*d) + (2*Sin[c + d*x]^5)/(5*a^2
*d)

________________________________________________________________________________________

Rubi [A]  time = 0.175888, antiderivative size = 68, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 7, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.226, Rules used = {3092, 3090, 2633, 2565, 30, 2564, 14} \[ \frac{2 \sin ^5(c+d x)}{5 a^2 d}-\frac{\sin ^3(c+d x)}{a^2 d}+\frac{\sin (c+d x)}{a^2 d}+\frac{2 i \cos ^5(c+d x)}{5 a^2 d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3/(a*Cos[c + d*x] + I*a*Sin[c + d*x])^2,x]

[Out]

(((2*I)/5)*Cos[c + d*x]^5)/(a^2*d) + Sin[c + d*x]/(a^2*d) - Sin[c + d*x]^3/(a^2*d) + (2*Sin[c + d*x]^5)/(5*a^2
*d)

Rule 3092

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> Dist[a^n*b^n, Int[Cos[c + d*x]^m/(b*Cos[c + d*x] + a*Sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, m},
x] && EqQ[a^2 + b^2, 0] && ILtQ[n, 0]

Rule 3090

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_.), x_Sym
bol] :> Int[ExpandTrig[cos[c + d*x]^m*(a*cos[c + d*x] + b*sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d}, x] &&
 IntegerQ[m] && IGtQ[n, 0]

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 2565

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2564

Int[cos[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(a*f), Subst[Int[
x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Sin[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] &&
 !(IntegerQ[(m - 1)/2] && LtQ[0, m, n])

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \frac{\cos ^3(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^2} \, dx &=-\frac{\int \cos ^3(c+d x) (i a \cos (c+d x)+a \sin (c+d x))^2 \, dx}{a^4}\\ &=-\frac{\int \left (-a^2 \cos ^5(c+d x)+2 i a^2 \cos ^4(c+d x) \sin (c+d x)+a^2 \cos ^3(c+d x) \sin ^2(c+d x)\right ) \, dx}{a^4}\\ &=-\frac{(2 i) \int \cos ^4(c+d x) \sin (c+d x) \, dx}{a^2}+\frac{\int \cos ^5(c+d x) \, dx}{a^2}-\frac{\int \cos ^3(c+d x) \sin ^2(c+d x) \, dx}{a^2}\\ &=\frac{(2 i) \operatorname{Subst}\left (\int x^4 \, dx,x,\cos (c+d x)\right )}{a^2 d}-\frac{\operatorname{Subst}\left (\int x^2 \left (1-x^2\right ) \, dx,x,\sin (c+d x)\right )}{a^2 d}-\frac{\operatorname{Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,-\sin (c+d x)\right )}{a^2 d}\\ &=\frac{2 i \cos ^5(c+d x)}{5 a^2 d}+\frac{\sin (c+d x)}{a^2 d}-\frac{2 \sin ^3(c+d x)}{3 a^2 d}+\frac{\sin ^5(c+d x)}{5 a^2 d}-\frac{\operatorname{Subst}\left (\int \left (x^2-x^4\right ) \, dx,x,\sin (c+d x)\right )}{a^2 d}\\ &=\frac{2 i \cos ^5(c+d x)}{5 a^2 d}+\frac{\sin (c+d x)}{a^2 d}-\frac{\sin ^3(c+d x)}{a^2 d}+\frac{2 \sin ^5(c+d x)}{5 a^2 d}\\ \end{align*}

Mathematica [A]  time = 0.0854094, size = 111, normalized size = 1.63 \[ \frac{\sin (c+d x)}{2 a^2 d}+\frac{\sin (3 (c+d x))}{8 a^2 d}+\frac{\sin (5 (c+d x))}{40 a^2 d}+\frac{i \cos (c+d x)}{4 a^2 d}+\frac{i \cos (3 (c+d x))}{8 a^2 d}+\frac{i \cos (5 (c+d x))}{40 a^2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3/(a*Cos[c + d*x] + I*a*Sin[c + d*x])^2,x]

[Out]

((I/4)*Cos[c + d*x])/(a^2*d) + ((I/8)*Cos[3*(c + d*x)])/(a^2*d) + ((I/40)*Cos[5*(c + d*x)])/(a^2*d) + Sin[c +
d*x]/(2*a^2*d) + Sin[3*(c + d*x)]/(8*a^2*d) + Sin[5*(c + d*x)]/(40*a^2*d)

________________________________________________________________________________________

Maple [A]  time = 0.127, size = 108, normalized size = 1.6 \begin{align*} 2\,{\frac{1}{d{a}^{2}} \left ({\frac{-i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{4}}}+{\frac{5/4\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{2}}}+2/5\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-5}-3/2\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-3}+{\frac{7}{8\,\tan \left ( 1/2\,dx+c/2 \right ) -8\,i}}+1/8\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{-1} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3/(a*cos(d*x+c)+I*a*sin(d*x+c))^2,x)

[Out]

2/d/a^2*(-I/(tan(1/2*d*x+1/2*c)-I)^4+5/4*I/(tan(1/2*d*x+1/2*c)-I)^2+2/5/(tan(1/2*d*x+1/2*c)-I)^5-3/2/(tan(1/2*
d*x+1/2*c)-I)^3+7/8/(tan(1/2*d*x+1/2*c)-I)+1/8/(tan(1/2*d*x+1/2*c)+I))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a*cos(d*x+c)+I*a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 0.473445, size = 161, normalized size = 2.37 \begin{align*} \frac{{\left (-5 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 15 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 5 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i\right )} e^{\left (-5 i \, d x - 5 i \, c\right )}}{40 \, a^{2} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a*cos(d*x+c)+I*a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/40*(-5*I*e^(6*I*d*x + 6*I*c) + 15*I*e^(4*I*d*x + 4*I*c) + 5*I*e^(2*I*d*x + 2*I*c) + I)*e^(-5*I*d*x - 5*I*c)/
(a^2*d)

________________________________________________________________________________________

Sympy [A]  time = 0.882052, size = 165, normalized size = 2.43 \begin{align*} \begin{cases} \frac{\left (- 2560 i a^{6} d^{3} e^{10 i c} e^{i d x} + 7680 i a^{6} d^{3} e^{8 i c} e^{- i d x} + 2560 i a^{6} d^{3} e^{6 i c} e^{- 3 i d x} + 512 i a^{6} d^{3} e^{4 i c} e^{- 5 i d x}\right ) e^{- 9 i c}}{20480 a^{8} d^{4}} & \text{for}\: 20480 a^{8} d^{4} e^{9 i c} \neq 0 \\\frac{x \left (e^{6 i c} + 3 e^{4 i c} + 3 e^{2 i c} + 1\right ) e^{- 5 i c}}{8 a^{2}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3/(a*cos(d*x+c)+I*a*sin(d*x+c))**2,x)

[Out]

Piecewise(((-2560*I*a**6*d**3*exp(10*I*c)*exp(I*d*x) + 7680*I*a**6*d**3*exp(8*I*c)*exp(-I*d*x) + 2560*I*a**6*d
**3*exp(6*I*c)*exp(-3*I*d*x) + 512*I*a**6*d**3*exp(4*I*c)*exp(-5*I*d*x))*exp(-9*I*c)/(20480*a**8*d**4), Ne(204
80*a**8*d**4*exp(9*I*c), 0)), (x*(exp(6*I*c) + 3*exp(4*I*c) + 3*exp(2*I*c) + 1)*exp(-5*I*c)/(8*a**2), True))

________________________________________________________________________________________

Giac [A]  time = 1.16359, size = 126, normalized size = 1.85 \begin{align*} \frac{\frac{5}{a^{2}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right )}} + \frac{35 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 90 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 120 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 70 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 21}{a^{2}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}^{5}}}{20 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3/(a*cos(d*x+c)+I*a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/20*(5/(a^2*(tan(1/2*d*x + 1/2*c) + I)) + (35*tan(1/2*d*x + 1/2*c)^4 - 90*I*tan(1/2*d*x + 1/2*c)^3 - 120*tan(
1/2*d*x + 1/2*c)^2 + 70*I*tan(1/2*d*x + 1/2*c) + 21)/(a^2*(tan(1/2*d*x + 1/2*c) - I)^5))/d